Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ControlRow): allow items to be added if contentItems is empty #531

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

shanteaustin
Copy link
Contributor

@shanteaustin shanteaustin commented Sep 6, 2024

Description

Adding contentItems to an empty ControlRow throws an error

References

Testing

  • Paste Below code inside of ControlRow.stories to test:
export const Bug = () =>
  class Bug extends lng.Component {
    static _template() {
      return {
        ControlRow: {
          type: ControlRowComponent,
          leftControls: [],
          contentItems: [],
          rightControls: [],
          lazyLoadBuffer: 1
        }
      };
    }

    _construct() {
      setTimeout(() => {
        if (this._ControlRow) {
          this._ControlRow.addContentItems(
            createItems(
              3,
              'https://image.tmdb.org/t/p/w500/frwl2zBNAl5ZbFDJGoJv0mYo0rF.jpg'
            )
          );
        }
      }, 1500);
    }
    _getFocused() {
      return this.tag('ControlRow');
    }

    get _ControlRow() {
      return this.tag('ControlRow');
    }
  };
  • Open the console to see that error no longer exists
  • Items should be showing in the contentRow as expected

Checklist

  • all commented code has been removed
  • any new console issues have been resolved
  • code linter and formatter has been run
  • test coverage meets repo requirements
  • PR name matches the expected semantic-commit syntax

@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Passed.

@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

@shanteaustin shanteaustin changed the title fix for content Items not showing if contnent is added after contentRows fix(ControlRow): allow items to be added if contentItems is empty Sep 6, 2024
@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

Copy link
Contributor

@cee-money cee-money left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ImCoolNowRight ImCoolNowRight merged commit 0b1323f into develop Sep 10, 2024
9 checks passed
@ImCoolNowRight ImCoolNowRight deleted the fix/contentItems-not-showing branch September 10, 2024 21:04
svc-lightning-ui-components pushed a commit that referenced this pull request Sep 19, 2024
# [@lightningjs/ui-components-v2.22.0](https://github.com/rdkcentral/Lightning-UI-Components/compare/@lightningjs/ui-components-v2.21.9...@lightningjs/ui-components-v2.22.0) (2024-09-19)

### Bug Fixes

* **ControlRow:** allow items to be added if contentItems is empty ([#531](#531)) ([0b1323f](0b1323f))
* **MetadataCardContent:** expose subtitle property ([#537](#537)) ([d1ac54a](d1ac54a))
* **metadataCardContent:** Provider covers text after decrementing value ([#532](#532)) ([0792267](0792267))

### Features

* **InlineContent:** Font Strikethrough ([#535](#535)) ([108266e](108266e))
* **Keyboard:** pre-load keyboards ([#538](#538)) ([0016708](0016708))
* **ScrollWrapper:** add signals for button press at top and bottom of content ([#533](#533)) ([a914066](a914066))
@svc-lightning-ui-components
Copy link
Collaborator

🎉 This PR is included in version @lightningjs/ui-components-v2.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants